package com.soecode.lyf.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.soecode.lyf.dao.FocusDao;
import com.soecode.lyf.entity.User;
import com.soecode.lyf.service.FocusService;

@Service
public class FocusServiceImpl implements FocusService {
	
	@Autowired
	private FocusDao focusdao;
	
	@Override
	public int FocusOn(String userid, String focusid) { // 关注
		return focusdao.FocusOn(userid,focusid);
	}
	
	@Override
	public List<User> returnFocus(String userid){ // 返回关注列表
		return focusdao.returnFocus(userid);
	}
	
	@Override
	public int QuestionAdopt(String userid, String questionid, String focusid) { // 采纳答案
		return focusdao.QuestionAdopt(userid,questionid,focusid);
	}
	
	@Override
	public int addIntegral(String userid) { // 增加积分
		return focusdao.addIntegral(userid);
	}
	
	@Override
	public List<User> AllFocus(String userid){ // 查询用户关注的对象
		return focusdao.AllFocus(userid);
	}
	
	@Override
	public int cancelFocus(String userid, String focusid) { // 增加积分
		return focusdao.cancelFocus(userid,focusid);
	}
}
